/*
 * @Author: chengsl
 * @Date: 2022-11-11 14:31:59
 * @LastEditors: chengsl
 * @LastEditTime: 2022-12-07 16:08:25
 * @Description: api 封装
 */

import request from '@/utils/request'
const baseUrl = '/nodeApi'

export function queryUserList(data = {}) {
  return request({
    url: `${baseUrl}/customer/queryList`,
    // method: 'post',
    method: 'get',
    inUrl: true,
    data,
    headers: {
      // 'Content-Type': 'multipart/form-data'
      // 'Content-Type': 'application/json'
    }
  })
}

export function addCustomer(data = {}) {
  return request({
    url: `${baseUrl}/customer/add`,
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function updateCustomer(data = {}) {
  return request({
    url: `${baseUrl}/customer/update`,
    method: 'put',
    data,
		reqEncryption: true, // 需要加密
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function delCustomer(data = {}) {
  return request({
    url: `${baseUrl}/customer/delete`,
    method: 'delete',
    inUrl: true,
    data,
    headers: {
      // 'Content-Type': 'application/json'
    }
  })
}
